<!-- 数字地图-定位卡管理-定位卡回收 -->
<template>
  <div class="JNPF-common-layout">
    <div class="JNPF-common-layout-center">
      <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent>
          <el-col :span="8">
            <el-form-item label="日期">
              <el-date-picker v-model="fbillcredate" type="daterange" value-format="yyyy-MM-dd" range-separator="至"
                start-placeholder="开始日期" end-placeholder="结束日期">
              </el-date-picker>
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="学校名称">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
           

          <template v-if="showAll">

            <el-col :span="6">
            <el-form-item label="研学课程">
              <el-input v-model="listQuery.fuser" placeholder="请输入研学课程" clearable />
            </el-form-item>
          </el-col>
            
           <el-col :span="6">
            <el-form-item label="姓名">
              <el-input v-model="listQuery.fuser" placeholder="请输入学籍号或姓名" clearable />
            </el-form-item>
          </el-col>

          <el-col :span="6">
            <el-form-item label="状态">
              <el-select v-model="listQuery.fcustomno" placeholder="请选择"
                :disabled="$store.getters.userInfo.manufacturer">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </template>

          <el-col :span="8">
            <el-form-item label="">
              <el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
              <!-- <el-button type="success" icon="el-icon-plus" @click="insert(undefined)">新增</el-button> -->
              <!-- <el-button type="warning" icon="el-icon-upload2">导入</el-button> -->
              <el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">展开</el-button>
              <el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
                收起</el-button>
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
      <div class="JNPF-common-layout-main JNPF-flex-main">
        <JNPF-table :data="list" border v-loading="loading">
          <el-table-column prop="FBILLNO" label="单号"></el-table-column>
          <el-table-column prop="FBILLCREDATE" label="投诉日期" width="105"></el-table-column>
          <el-table-column prop="FHOME" label="学校名称"></el-table-column>
          <!-- <el-table-column prop="FCATNO" label="研学编号"></el-table-column> -->
          <el-table-column prop="FCATNAME" label="研学名称"></el-table-column>
          <el-table-column prop="FUSER" label="人员姓名" width="85"></el-table-column>
          <el-table-column prop="FMEMO" label="投诉内容" ></el-table-column>
          <el-table-column prop="FBILLTYPE" label="类型" width="95"></el-table-column>
          <el-table-column prop="FBILLSTATE" label="状态" width="95"></el-table-column>
          <el-table-column fixed="left" label="操作" width="105">
            <template slot-scope="scope">
              <el-button @click.native.prevent="insert(scope.row.FCATNO)" icon="el-icon-edit" type="text" size="small">
                录入
              </el-button>
              <!-- <el-popconfirm title="确定回收定位卡数据吗？" @confirm="Catdelete(scope.row.FCATNO)">
                <el-button slot="reference" icon="el-icon-s-goods" style="color: red;margin-left: 10px;"
                  type="text">回收</el-button>
              </el-popconfirm> -->
            </template>
          </el-table-column>
        </JNPF-table>
        <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" />
        <Form ref="Form" :parelist="list" />
      </div>
    </div>
  </div>
</template>

<script>
  import jnpf from "@/utils/jnpf"
  import Form from "./Form.vue"
  export default {
    name: 'shop',
    components: { Form },
    data() {
      return {
        showAll:false,
        fbillcredate: [jnpf.dateFormat(new Date(), "YYYY-MM-DD"), jnpf.dateFormat(new Date(), "YYYY-MM-DD")],

        options1: [{
          value: '20E01',
          label: '闵行春申小学'
        }, {
          value: '20E02',
          label: '闵行莘城中学'
        }, {
          value: '20N01',
          label: '闵行莘松中学'
        }, {
          value: '20N02',
          label: '闵行莘庄中学'
        }],

        fvisiblelist: [
          { id: "1", fullName: "是" },
          { id: "2", fullName: "否" },
        ],
        total: 0,
        list: [
            {
            "FBILLNO": "K241130001", 
            "FBILLCREDATE":"2024-11-29",
            "FHOME":"闵行春申小学",
            "FCATNO":"SH240101",
            "FCATNAME":"上海博物馆研学",
            "FUSER": "方腊",
            "FTELNO": "116****9632",
            "FUSEDATE": "2024-12-01",
            "FBEGTIME":"2024-09-14",
            "FENDTIME":"2025-06-31",
            "FMEMO": "导游讲解不专业",
            "FCHECKUSE": "",
            "FCHECKDATE": "",
            "FNOTE":"",
            "FBILLTYPE":"导游讲解",
            "FBILLSTATE": "申请中"
            },{
            "FBILLNO": "K241130002", 
            "FBILLCREDATE":"2024-11-29",
            "FHOME":"闵行春申小学",
            "FCATNO":"SH240101",
            "FCATNAME":"上海博物馆研学",
            "FUSER": "阮小二",
            "FTELNO": "116****9632",
            "FUSEDATE": "2024-12-01",
            "FBEGTIME":"2024-09-14",
            "FENDTIME":"2025-06-31",
            "FMEMO": "客服服务不专业",
            "FCHECKUSE": "",
            "FCHECKDATE": "",
            "FNOTE":"",
            "FBILLTYPE":"服务态度",
            "FBILLSTATE": "申请中"
            },
            ,{
            "FBILLNO": "K241130003", 
            "FBILLCREDATE":"2024-11-29",
            "FHOME":"闵行莘松中学",
            "FCATNO":"SH240102",
            "FCATNAME":"上海国际汽车城研学",
            "FUSER": "关羽",
            "FTELNO": "116****9632",
            "FUSEDATE": "2024-12-01",
            "FBEGTIME":"2024-09-14",
            "FENDTIME":"2028-06-31",
            "FMEMO": "房间有异味",
            "FCHECKUSE": "",
            "FCHECKDATE": "",
            "FNOTE":"",
            "FBILLTYPE":"住宿问题",
            "FBILLSTATE": "申请中"
            },{
            "FBILLNO": "K241130005", 
            "FBILLCREDATE":"2024-11-29",
            "FHOME":"闵行莘松中学",
            "FCATNO":"SH240102",
            "FCATNAME":"上海国际汽车城研学",
            "FUSER": "宋江",
            "FTELNO": "116****9632",
            "FUSEDATE": "2024-12-01",
            "FBEGTIME":"2024-09-14",
            "FENDTIME":"2025-06-31",
            "FMEMO": "购买的纪念品已损坏",
            "FCHECKUSE": "",
            "FCHECKDATE": "",
            "FNOTE":"",
            "FBILLTYPE":"产品质量",
            "FBILLSTATE": "已受理"
            },
        ],
        loading: false,
        listQuery: {
          page: 1,
          limit: 20,
          sort: "desc",
          sidx: "",
          fcatno: "",
          fcatname: ""
        },
      };
    },
    computed: {},
    created() {
    },
    methods: {
      insert(row) {
        this.$refs.Form.init(row);
      },
    },
  };
</script>